echo starting
echo "git pull"
bash update
pip install --upgrade pip -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com >/dev/null 2>&1
echo "pip updated"
pip install -r requirements.txt -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com --upgrade >/dev/null 2>&1
echo "requirements updated"
apt-get install update >/dev/null 2>&1
apt-get install xfonts-75dpi xfonts-base >/dev/null 2>&1
echo "apt-get updated"
dpkg -i wkhtmltox_0.12.6.1-2.bullseye_amd64.deb >/dev/null 2>&1
rm -rf /usr/share/fonts/*
cp Songti.ttc /usr/share/fonts/Songti.ttc
echo "wkhtmltox installed"
if [ ! -d logs ]; then
  mkdir logs
fi

supervisord -c supervisord.conf -n